package com.molin.API.test1;

public class Demo1StringBuilder {
    public static void main(String[] args) {
        long ctime=System.currentTimeMillis();
        StringBuilder sb=new StringBuilder("A");
        for(int i=0;i<=50000;i++){
            sb.append(i);
        }
        //9
        System.out.println(System.currentTimeMillis()-ctime);
    }

    public static void ctimeTest() {
        long ctime=System.currentTimeMillis();
        String str="";
        for(int i=0;i<=50000;i++){
            str+=i;
        }
        //1630
        System.out.println(System.currentTimeMillis()-ctime);
    }
}
